Fix #451: Support Spring Boot 4.0.x#452
Conversation
There was a problem hiding this comment.
Pull request overview
Updates this multi-module library to align with the Spring Boot 4.x ecosystem by adjusting dependency versions and adapting Jackson/WebFlux integration to the newer stack.
Changes:
- Bump parent-managed Spring Boot version to 4.0.6.
- Migrate multiple modules/tests from
com.fasterxml.jackson.*totools.jackson.*APIs and adjust WebClient codec configuration accordingly. - Update REST client request header handling and a few test assertions for Spring 4/Spring Framework updates.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
pom.xml |
Bumps the managed Spring Boot dependency version to 4.0.6. |
rest-model-base/src/main/java/com/wultra/core/rest/model/base/response/ObjectResponse.java |
Adds JSON property ordering annotation to stabilize serialized field order. |
rest-model-base/pom.xml |
Adds a Jackson dependency to support new JSON annotations in the model module. |
rest-client-base/src/main/java/com/wultra/core/rest/client/base/DefaultRestClient.java |
Migrates Jackson/WebClient codec configuration and type handling for Spring Boot 4 compatibility. |
rest-client-base/src/main/java/com/wultra/core/rest/client/base/RestClientConfiguration.java |
Switches Jackson feature types to the relocated Jackson API surface. |
rest-client-base/src/test/java/com/wultra/core/rest/client/base/DefaultRestClientTest.java |
Updates tests to new Jackson exception types and header handling style. |
rest-client-base/pom.xml |
Adds relocated Jackson dependency and epoll transport classes required by Netty option usage. |
http-common/src/test/java/com/wultra/core/http/common/headers/UserAgentTest.java |
Migrates test JSON parsing to the relocated Jackson API surface. |
http-common/pom.xml |
Updates test Jackson dependency coordinates to relocated groupId. |
audit-base/src/main/java/com/wultra/core/audit/base/util/JsonUtil.java |
Migrates JSON serialization utilities to relocated Jackson APIs and a builder-based mapper. |
audit-base/pom.xml |
Updates Jackson dependency coordinates and removes the JavaTime datatype module dependency. |
Comments suppressed due to low confidence (1)
rest-client-base/src/main/java/com/wultra/core/rest/client/base/DefaultRestClient.java:110
- DefaultRestClient constructor signature changed from accepting Jackson Module to JacksonModule (tools.jackson.*). This is a breaking API change for library consumers passing standard Jackson modules; consider keeping a compatibility overload or clearly versioning/documenting the breaking change as part of the Spring Boot 4 migration.
* @param modules jackson modules
* @throws RestClientException Thrown in case client initialization fails.
*/
public DefaultRestClient(final RestClientConfiguration config, final JacksonModule... modules) throws RestClientException {
// Use WebClient configuration from the config constructor parameter
this.config = config;
this.modules = modules == null ? Collections.emptyList() : Arrays.asList(modules);
initializeWebClient();
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
banterCZ
left a comment
There was a problem hiding this comment.
May we please start writing Changelog.md as we have discussed? Just one line, that we are migrating to Spring Boot 4 and Jackson 3.
banterCZ
left a comment
There was a problem hiding this comment.
Thanks for reflecting the comments.
vita-kotacka
left a comment
There was a problem hiding this comment.
LGTM — migration to Spring Boot 4 and Jackson 3 is complete and correct.
One thing to fix before merging:
Missing WRITE_DATES_AS_TIMESTAMPS configuration in JsonUtil
The old code had:
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);The new builder chain omits this. Jackson 3's default is still WRITE_DATES_AS_TIMESTAMPS = true, so date/time fields (e.g. Instant, LocalDateTime) will serialize as numeric arrays like [1747208485, 123000000] instead of ISO-8601 strings like "2026-05-14T08:41:25.123Z". This silently breaks the audit log JSON format.
Fix: add .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) to the JsonMapper.builder() chain in JsonUtil.java.
|
No description provided.